// Lean compiler output
// Module: Std.Time.Date.Unit.Weekday
// Imports: public import Std.Time.Date.Unit.Day
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#ifdef __cplusplus
extern "C" {
#endif
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___redArg___boxed(lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__13;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_saturday_elim(lean_object*, uint8_t, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__20;
LEAN_EXPORT lean_object* l_Std_Time_instReprWeekday_repr___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_sunday_elim___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorIdx___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__17;
LEAN_EXPORT uint8_t l_Std_Time_Weekday_ofOrdinal(lean_object*);
static lean_object* l_Std_Time_instReprWeekday___closed__0;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_thursday_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__13;
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__0;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_ofNat_x21___closed__3;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_sunday_elim(lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Std_Time_Weekday_next(uint8_t);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__1;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_saturday_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__16;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__22;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instDecidableEqOrdinal___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofNat___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_thursday_elim___redArg___boxed(lean_object*);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__8;
static lean_object* l_Std_Time_instReprWeekday_repr___closed__6;
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__4;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_saturday_elim___redArg___boxed(lean_object*);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__15;
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__4;
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__3;
static lean_object* l_Std_Time_instReprWeekday_repr___closed__7;
LEAN_EXPORT uint8_t l_Std_Time_instInhabitedWeekday_default;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofNat_x3f(lean_object*);
lean_object* lean_int_emod(lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__27;
static lean_object* l_Std_Time_Weekday_instOrdOrdinal___closed__0;
LEAN_EXPORT lean_object* l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter___redArg___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__10;
LEAN_EXPORT uint8_t l_Std_Time_Weekday_instDecidableEqOrdinal(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_monday_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__30;
static lean_object* l_Std_Time_instReprWeekday_repr___closed__0;
lean_object* l_panic___redArg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_friday_elim___redArg(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__19;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_tuesday_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___redArg(uint8_t, uint8_t);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorElim(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_thursday_elim___redArg(lean_object*);
lean_object* l_Std_Time_Internal_Bounded_instOrd___lam__0___boxed(lean_object*);
uint8_t lean_int_dec_le(lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__23;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__3;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__4;
static lean_object* l_Std_Time_Weekday_ofNat_x3f___closed__2;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_next___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__36;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_friday_elim(lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorElim___redArg(lean_object*);
LEAN_EXPORT uint8_t l_Std_Time_Weekday_instDecidableLtOrdinal(lean_object*, lean_object*);
lean_object* l_compareOn___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_sunday_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_instNatCastInt___lam__0(lean_object*);
LEAN_EXPORT uint8_t l_Std_Time_instDecidableEqWeekday(uint8_t, uint8_t);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorElim___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__41;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__25;
static lean_object* l_Std_Time_Weekday_instOrd___closed__1;
static lean_object* l_Std_Time_instReprWeekday_repr___closed__14;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_monday_elim(lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instOrd;
static lean_object* l_Std_Time_Weekday_ofNat_x3f___closed__3;
static lean_object* l_Std_Time_instReprWeekday_repr___closed__10;
lean_object* lean_nat_to_int(lean_object*);
LEAN_EXPORT uint8_t l_Std_Time_Weekday_ofNat(lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___redArg___lam__0___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__37;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__21;
lean_object* l_Std_Time_Internal_Bounded_instRepr___lam__0___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_thursday_elim(lean_object*, uint8_t, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_instReprOrdinal___closed__0;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_wednesday_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__2;
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__9;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__33;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_tuesday_elim___redArg___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instOrdOrdinal;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion(lean_object*, uint8_t, uint8_t, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorIdx(uint8_t);
lean_object* l_Std_Time_Internal_Bounded_LE_instOfNatHAddIntCast(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instLTOrdinal;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_wednesday_elim(lean_object*, uint8_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_isWeekend___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__6;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instDecidableLeOrdinal___boxed(lean_object*, lean_object*);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__2;
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__5;
static lean_object* l_Std_Time_instReprWeekday_repr___closed__9;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__24;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toOrdinal(uint8_t);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorElim___redArg___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__1;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toCtorIdx___boxed(lean_object*);
LEAN_EXPORT uint8_t l_Std_Time_Weekday_ofNat_x21(lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_friday_elim___redArg___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_instOrdOrdinal___closed__1;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__31;
static lean_object* l_Std_Time_instReprWeekday_repr___closed__11;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toNat___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__34;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__8;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_sunday_elim___redArg(lean_object*);
lean_object* lean_int_sub(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_wednesday_elim___redArg___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__2;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_wednesday_elim___redArg(lean_object*);
static lean_object* l_Std_Time_Weekday_ofNat_x3f___closed__5;
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__8;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofOrdinal___boxed(lean_object*);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__5;
LEAN_EXPORT uint8_t l_Std_Time_Weekday_isWeekend(uint8_t);
LEAN_EXPORT lean_object* l_Std_Time_instReprWeekday;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_tuesday_elim___redArg(lean_object*);
static lean_object* l_Std_Time_Weekday_ofNat_x3f___closed__1;
LEAN_EXPORT lean_object* l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter___redArg(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__9;
static lean_object* l_Std_Time_Weekday_ofNat_x3f___closed__0;
LEAN_EXPORT uint8_t l_Std_Time_Weekday_instDecidableLeOrdinal(lean_object*, lean_object*);
lean_object* lean_nat_abs(lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_monday_elim___redArg(lean_object*);
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__7;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__0;
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__6;
static lean_object* l_Std_Time_Weekday_ofNat_x3f___closed__4;
static lean_object* l_Std_Time_Weekday_ofOrdinal___closed__0;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__32;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instLEOrdinal;
lean_object* l_Repr_addAppParen(lean_object*, lean_object*);
uint8_t lean_int_dec_lt(lean_object*, lean_object*);
lean_object* lean_nat_sub(lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_ofNat_x21___closed__0;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_saturday_elim___redArg(lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_friday_elim___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_instOrdInt___lam__0___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toNat(uint8_t);
LEAN_EXPORT lean_object* l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_instOrd___closed__0;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instInhabitedOrdinal;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_monday_elim___redArg___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_ofNat_x21___closed__1;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_tuesday_elim(lean_object*, uint8_t, lean_object*, lean_object*);
lean_object* l_mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toOrdinal___boxed(lean_object*);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__12;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__29;
LEAN_EXPORT lean_object* l_Std_Time_instDecidableEqWeekday___boxed(lean_object*, lean_object*);
lean_object* lean_int_add(lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_instOrdOrdinal___closed__2;
LEAN_EXPORT uint8_t l_Std_Time_instInhabitedWeekday;
LEAN_EXPORT lean_object* l_Nat_cast___at___00Std_Time_Weekday_toOrdinal_spec__0(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__11;
uint8_t lean_int_dec_eq(lean_object*, lean_object*);
static lean_object* l_Std_Time_instReprWeekday_repr___closed__3;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___redArg___lam__0(lean_object*);
static lean_object* l_Std_Time_Weekday_instInhabitedOrdinal___closed__1;
static lean_object* l_Std_Time_Weekday_ofNat_x3f___closed__6;
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__26;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__39;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__14;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__15;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toCtorIdx(uint8_t);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__35;
static lean_object* l_Std_Time_Weekday_ofNat_x21___closed__2;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instOfNatOrdinal(lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofNat_x3f___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__40;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__5;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instDecidableLtOrdinal___boxed(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Std_Time_instReprWeekday_repr(uint8_t, lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__12;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__38;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofNat_x21___boxed(lean_object*);
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__28;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__7;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__18;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instReprOrdinal;
static lean_object* l_Std_Time_Weekday_toOrdinal___closed__42;
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorIdx(uint8_t x_1) {
_start:
{
switch (x_1) {
case 0:
{
lean_object* x_2; 
x_2 = lean_unsigned_to_nat(0u);
return x_2;
}
case 1:
{
lean_object* x_3; 
x_3 = lean_unsigned_to_nat(1u);
return x_3;
}
case 2:
{
lean_object* x_4; 
x_4 = lean_unsigned_to_nat(2u);
return x_4;
}
case 3:
{
lean_object* x_5; 
x_5 = lean_unsigned_to_nat(3u);
return x_5;
}
case 4:
{
lean_object* x_6; 
x_6 = lean_unsigned_to_nat(4u);
return x_6;
}
case 5:
{
lean_object* x_7; 
x_7 = lean_unsigned_to_nat(5u);
return x_7;
}
default: 
{
lean_object* x_8; 
x_8 = lean_unsigned_to_nat(6u);
return x_8;
}
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorIdx___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = lean_unbox(x_1);
x_3 = l_Std_Time_Weekday_ctorIdx(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toCtorIdx(uint8_t x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_ctorIdx(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toCtorIdx___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = lean_unbox(x_1);
x_3 = l_Std_Time_Weekday_toCtorIdx(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorElim(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_inc(x_5);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorElim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorElim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; lean_object* x_7; 
x_6 = lean_unbox(x_3);
x_7 = l_Std_Time_Weekday_ctorElim(x_1, x_2, x_6, x_4, x_5);
lean_dec(x_5);
lean_dec(x_2);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ctorElim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_ctorElim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_monday_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_monday_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_monday_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Std_Time_Weekday_monday_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_monday_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_monday_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_tuesday_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_tuesday_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_tuesday_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Std_Time_Weekday_tuesday_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_tuesday_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_tuesday_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_wednesday_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_wednesday_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_wednesday_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Std_Time_Weekday_wednesday_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_wednesday_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_wednesday_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_thursday_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_thursday_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_thursday_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Std_Time_Weekday_thursday_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_thursday_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_thursday_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_friday_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_friday_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_friday_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Std_Time_Weekday_friday_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_friday_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_friday_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_saturday_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_saturday_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_saturday_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Std_Time_Weekday_saturday_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_saturday_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_saturday_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_sunday_elim(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_inc(x_4);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_sunday_elim___redArg(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_sunday_elim___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; lean_object* x_6; 
x_5 = lean_unbox(x_2);
x_6 = l_Std_Time_Weekday_sunday_elim(x_1, x_5, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_sunday_elim___redArg___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_sunday_elim___redArg(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___redArg___lam__0(lean_object* x_1) {
_start:
{
lean_inc(x_1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___redArg___lam__0___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_noConfusion___redArg___lam__0(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___redArg(uint8_t x_1, uint8_t x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; 
x_3 = l_Std_Time_Weekday_ctorIdx(x_1);
x_4 = l_Std_Time_Weekday_ctorIdx(x_2);
x_5 = lean_nat_dec_eq(x_3, x_4);
lean_dec(x_4);
lean_dec(x_3);
x_6 = lean_alloc_closure((void*)(l_Std_Time_Weekday_noConfusion___redArg___lam__0___boxed), 1, 0);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion(lean_object* x_1, uint8_t x_2, uint8_t x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Std_Time_Weekday_noConfusion___redArg(x_2, x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; uint8_t x_6; lean_object* x_7; 
x_5 = lean_unbox(x_2);
x_6 = lean_unbox(x_3);
x_7 = l_Std_Time_Weekday_noConfusion(x_1, x_5, x_6, x_4);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_noConfusion___redArg___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; uint8_t x_4; lean_object* x_5; 
x_3 = lean_unbox(x_1);
x_4 = lean_unbox(x_2);
x_5 = l_Std_Time_Weekday_noConfusion___redArg(x_3, x_4);
return x_5;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Weekday.monday", 23, 23);
return x_1;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__0;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Weekday.tuesday", 24, 24);
return x_1;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__2;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Weekday.wednesday", 26, 26);
return x_1;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__4;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Weekday.thursday", 25, 25);
return x_1;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__6;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__8() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Weekday.friday", 23, 23);
return x_1;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__8;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__10() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Weekday.saturday", 25, 25);
return x_1;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__10;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__12() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Weekday.sunday", 23, 23);
return x_1;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__12;
x_2 = lean_alloc_ctor(3, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__14() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(2u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday_repr___closed__15() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(1u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Std_Time_instReprWeekday_repr(uint8_t x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_10; lean_object* x_17; lean_object* x_24; lean_object* x_31; lean_object* x_38; lean_object* x_45; 
switch (x_1) {
case 0:
{
lean_object* x_52; uint8_t x_53; 
x_52 = lean_unsigned_to_nat(1024u);
x_53 = lean_nat_dec_le(x_52, x_2);
if (x_53 == 0)
{
lean_object* x_54; 
x_54 = l_Std_Time_instReprWeekday_repr___closed__14;
x_3 = x_54;
goto block_9;
}
else
{
lean_object* x_55; 
x_55 = l_Std_Time_instReprWeekday_repr___closed__15;
x_3 = x_55;
goto block_9;
}
}
case 1:
{
lean_object* x_56; uint8_t x_57; 
x_56 = lean_unsigned_to_nat(1024u);
x_57 = lean_nat_dec_le(x_56, x_2);
if (x_57 == 0)
{
lean_object* x_58; 
x_58 = l_Std_Time_instReprWeekday_repr___closed__14;
x_10 = x_58;
goto block_16;
}
else
{
lean_object* x_59; 
x_59 = l_Std_Time_instReprWeekday_repr___closed__15;
x_10 = x_59;
goto block_16;
}
}
case 2:
{
lean_object* x_60; uint8_t x_61; 
x_60 = lean_unsigned_to_nat(1024u);
x_61 = lean_nat_dec_le(x_60, x_2);
if (x_61 == 0)
{
lean_object* x_62; 
x_62 = l_Std_Time_instReprWeekday_repr___closed__14;
x_17 = x_62;
goto block_23;
}
else
{
lean_object* x_63; 
x_63 = l_Std_Time_instReprWeekday_repr___closed__15;
x_17 = x_63;
goto block_23;
}
}
case 3:
{
lean_object* x_64; uint8_t x_65; 
x_64 = lean_unsigned_to_nat(1024u);
x_65 = lean_nat_dec_le(x_64, x_2);
if (x_65 == 0)
{
lean_object* x_66; 
x_66 = l_Std_Time_instReprWeekday_repr___closed__14;
x_24 = x_66;
goto block_30;
}
else
{
lean_object* x_67; 
x_67 = l_Std_Time_instReprWeekday_repr___closed__15;
x_24 = x_67;
goto block_30;
}
}
case 4:
{
lean_object* x_68; uint8_t x_69; 
x_68 = lean_unsigned_to_nat(1024u);
x_69 = lean_nat_dec_le(x_68, x_2);
if (x_69 == 0)
{
lean_object* x_70; 
x_70 = l_Std_Time_instReprWeekday_repr___closed__14;
x_31 = x_70;
goto block_37;
}
else
{
lean_object* x_71; 
x_71 = l_Std_Time_instReprWeekday_repr___closed__15;
x_31 = x_71;
goto block_37;
}
}
case 5:
{
lean_object* x_72; uint8_t x_73; 
x_72 = lean_unsigned_to_nat(1024u);
x_73 = lean_nat_dec_le(x_72, x_2);
if (x_73 == 0)
{
lean_object* x_74; 
x_74 = l_Std_Time_instReprWeekday_repr___closed__14;
x_38 = x_74;
goto block_44;
}
else
{
lean_object* x_75; 
x_75 = l_Std_Time_instReprWeekday_repr___closed__15;
x_38 = x_75;
goto block_44;
}
}
default: 
{
lean_object* x_76; uint8_t x_77; 
x_76 = lean_unsigned_to_nat(1024u);
x_77 = lean_nat_dec_le(x_76, x_2);
if (x_77 == 0)
{
lean_object* x_78; 
x_78 = l_Std_Time_instReprWeekday_repr___closed__14;
x_45 = x_78;
goto block_51;
}
else
{
lean_object* x_79; 
x_79 = l_Std_Time_instReprWeekday_repr___closed__15;
x_45 = x_79;
goto block_51;
}
}
}
block_9:
{
lean_object* x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; 
x_4 = l_Std_Time_instReprWeekday_repr___closed__1;
x_5 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_5, 0, x_3);
lean_ctor_set(x_5, 1, x_4);
x_6 = 0;
x_7 = lean_alloc_ctor(6, 1, 1);
lean_ctor_set(x_7, 0, x_5);
lean_ctor_set_uint8(x_7, sizeof(void*)*1, x_6);
x_8 = l_Repr_addAppParen(x_7, x_2);
return x_8;
}
block_16:
{
lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15; 
x_11 = l_Std_Time_instReprWeekday_repr___closed__3;
x_12 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_12, 0, x_10);
lean_ctor_set(x_12, 1, x_11);
x_13 = 0;
x_14 = lean_alloc_ctor(6, 1, 1);
lean_ctor_set(x_14, 0, x_12);
lean_ctor_set_uint8(x_14, sizeof(void*)*1, x_13);
x_15 = l_Repr_addAppParen(x_14, x_2);
return x_15;
}
block_23:
{
lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21; lean_object* x_22; 
x_18 = l_Std_Time_instReprWeekday_repr___closed__5;
x_19 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_19, 0, x_17);
lean_ctor_set(x_19, 1, x_18);
x_20 = 0;
x_21 = lean_alloc_ctor(6, 1, 1);
lean_ctor_set(x_21, 0, x_19);
lean_ctor_set_uint8(x_21, sizeof(void*)*1, x_20);
x_22 = l_Repr_addAppParen(x_21, x_2);
return x_22;
}
block_30:
{
lean_object* x_25; lean_object* x_26; uint8_t x_27; lean_object* x_28; lean_object* x_29; 
x_25 = l_Std_Time_instReprWeekday_repr___closed__7;
x_26 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_26, 0, x_24);
lean_ctor_set(x_26, 1, x_25);
x_27 = 0;
x_28 = lean_alloc_ctor(6, 1, 1);
lean_ctor_set(x_28, 0, x_26);
lean_ctor_set_uint8(x_28, sizeof(void*)*1, x_27);
x_29 = l_Repr_addAppParen(x_28, x_2);
return x_29;
}
block_37:
{
lean_object* x_32; lean_object* x_33; uint8_t x_34; lean_object* x_35; lean_object* x_36; 
x_32 = l_Std_Time_instReprWeekday_repr___closed__9;
x_33 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_33, 0, x_31);
lean_ctor_set(x_33, 1, x_32);
x_34 = 0;
x_35 = lean_alloc_ctor(6, 1, 1);
lean_ctor_set(x_35, 0, x_33);
lean_ctor_set_uint8(x_35, sizeof(void*)*1, x_34);
x_36 = l_Repr_addAppParen(x_35, x_2);
return x_36;
}
block_44:
{
lean_object* x_39; lean_object* x_40; uint8_t x_41; lean_object* x_42; lean_object* x_43; 
x_39 = l_Std_Time_instReprWeekday_repr___closed__11;
x_40 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_40, 0, x_38);
lean_ctor_set(x_40, 1, x_39);
x_41 = 0;
x_42 = lean_alloc_ctor(6, 1, 1);
lean_ctor_set(x_42, 0, x_40);
lean_ctor_set_uint8(x_42, sizeof(void*)*1, x_41);
x_43 = l_Repr_addAppParen(x_42, x_2);
return x_43;
}
block_51:
{
lean_object* x_46; lean_object* x_47; uint8_t x_48; lean_object* x_49; lean_object* x_50; 
x_46 = l_Std_Time_instReprWeekday_repr___closed__13;
x_47 = lean_alloc_ctor(4, 2, 0);
lean_ctor_set(x_47, 0, x_45);
lean_ctor_set(x_47, 1, x_46);
x_48 = 0;
x_49 = lean_alloc_ctor(6, 1, 1);
lean_ctor_set(x_49, 0, x_47);
lean_ctor_set_uint8(x_49, sizeof(void*)*1, x_48);
x_50 = l_Repr_addAppParen(x_49, x_2);
return x_50;
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_instReprWeekday_repr___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = lean_unbox(x_1);
x_4 = l_Std_Time_instReprWeekday_repr(x_3, x_2);
lean_dec(x_2);
return x_4;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Std_Time_instReprWeekday_repr___boxed), 2, 0);
return x_1;
}
}
static lean_object* _init_l_Std_Time_instReprWeekday() {
_start:
{
lean_object* x_1; 
x_1 = l_Std_Time_instReprWeekday___closed__0;
return x_1;
}
}
static uint8_t _init_l_Std_Time_instInhabitedWeekday_default() {
_start:
{
uint8_t x_1; 
x_1 = 0;
return x_1;
}
}
static uint8_t _init_l_Std_Time_instInhabitedWeekday() {
_start:
{
uint8_t x_1; 
x_1 = 0;
return x_1;
}
}
LEAN_EXPORT uint8_t l_Std_Time_Weekday_ofNat(lean_object* x_1) {
_start:
{
lean_object* x_2; uint8_t x_3; 
x_2 = lean_unsigned_to_nat(2u);
x_3 = lean_nat_dec_le(x_1, x_2);
if (x_3 == 0)
{
lean_object* x_4; uint8_t x_5; 
x_4 = lean_unsigned_to_nat(4u);
x_5 = lean_nat_dec_le(x_1, x_4);
if (x_5 == 0)
{
lean_object* x_6; uint8_t x_7; 
x_6 = lean_unsigned_to_nat(5u);
x_7 = lean_nat_dec_le(x_1, x_6);
if (x_7 == 0)
{
uint8_t x_8; 
x_8 = 6;
return x_8;
}
else
{
uint8_t x_9; 
x_9 = 5;
return x_9;
}
}
else
{
lean_object* x_10; uint8_t x_11; 
x_10 = lean_unsigned_to_nat(3u);
x_11 = lean_nat_dec_le(x_1, x_10);
if (x_11 == 0)
{
uint8_t x_12; 
x_12 = 4;
return x_12;
}
else
{
uint8_t x_13; 
x_13 = 3;
return x_13;
}
}
}
else
{
lean_object* x_14; uint8_t x_15; 
x_14 = lean_unsigned_to_nat(0u);
x_15 = lean_nat_dec_le(x_1, x_14);
if (x_15 == 0)
{
lean_object* x_16; uint8_t x_17; 
x_16 = lean_unsigned_to_nat(1u);
x_17 = lean_nat_dec_le(x_1, x_16);
if (x_17 == 0)
{
uint8_t x_18; 
x_18 = 2;
return x_18;
}
else
{
uint8_t x_19; 
x_19 = 1;
return x_19;
}
}
else
{
uint8_t x_20; 
x_20 = 0;
return x_20;
}
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofNat___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Std_Time_Weekday_ofNat(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT uint8_t l_Std_Time_instDecidableEqWeekday(uint8_t x_1, uint8_t x_2) {
_start:
{
lean_object* x_3; lean_object* x_4; uint8_t x_5; 
x_3 = l_Std_Time_Weekday_ctorIdx(x_1);
x_4 = l_Std_Time_Weekday_ctorIdx(x_2);
x_5 = lean_nat_dec_eq(x_3, x_4);
lean_dec(x_4);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Std_Time_instDecidableEqWeekday___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; 
x_3 = lean_unbox(x_1);
x_4 = lean_unbox(x_2);
x_5 = l_Std_Time_instDecidableEqWeekday(x_3, x_4);
x_6 = lean_box(x_5);
return x_6;
}
}
static lean_object* _init_l_Std_Time_Weekday_instReprOrdinal___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Std_Time_Internal_Bounded_instRepr___lam__0___boxed), 2, 0);
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_instReprOrdinal() {
_start:
{
lean_object* x_1; 
x_1 = l_Std_Time_Weekday_instReprOrdinal___closed__0;
return x_1;
}
}
LEAN_EXPORT uint8_t l_Std_Time_Weekday_instDecidableEqOrdinal(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; 
x_3 = lean_int_dec_eq(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instDecidableEqOrdinal___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l_Std_Time_Weekday_instDecidableEqOrdinal(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
x_4 = lean_box(x_3);
return x_4;
}
}
static lean_object* _init_l_Std_Time_Weekday_instLTOrdinal() {
_start:
{
lean_object* x_1; 
x_1 = lean_box(0);
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_instLEOrdinal() {
_start:
{
lean_object* x_1; 
x_1 = lean_box(0);
return x_1;
}
}
LEAN_EXPORT uint8_t l_Std_Time_Weekday_instDecidableLeOrdinal(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; 
x_3 = lean_int_dec_le(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instDecidableLeOrdinal___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l_Std_Time_Weekday_instDecidableLeOrdinal(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT uint8_t l_Std_Time_Weekday_instDecidableLtOrdinal(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; 
x_3 = lean_int_dec_lt(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instDecidableLtOrdinal___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = l_Std_Time_Weekday_instDecidableLtOrdinal(x_1, x_2);
lean_dec(x_2);
lean_dec(x_1);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_instOfNatOrdinal(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_2 = l_Std_Time_instReprWeekday_repr___closed__15;
x_3 = lean_unsigned_to_nat(6u);
x_4 = l_Std_Time_Internal_Bounded_LE_instOfNatHAddIntCast(x_2, x_1, x_3);
return x_4;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(6u);
x_2 = l_instNatCastInt___lam__0(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__0;
x_2 = l_Std_Time_instReprWeekday_repr___closed__15;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(1u);
x_2 = l_instNatCastInt___lam__0(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__1;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__3;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__2;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__4;
x_2 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__5;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__4;
x_2 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__6;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__4;
x_2 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__7;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__8;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instInhabitedOrdinal() {
_start:
{
lean_object* x_1; 
x_1 = l_Std_Time_Weekday_instInhabitedOrdinal___closed__9;
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_instOrdOrdinal___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Std_Time_Internal_Bounded_instOrd___lam__0___boxed), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_instOrdOrdinal___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_instOrdInt___lam__0___boxed), 2, 0);
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_instOrdOrdinal___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_instOrdOrdinal___closed__0;
x_2 = l_Std_Time_Weekday_instOrdOrdinal___closed__1;
x_3 = lean_alloc_closure((void*)(l_compareOn___boxed), 6, 4);
lean_closure_set(x_3, 0, lean_box(0));
lean_closure_set(x_3, 1, lean_box(0));
lean_closure_set(x_3, 2, x_2);
lean_closure_set(x_3, 3, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instOrdOrdinal() {
_start:
{
lean_object* x_1; 
x_1 = l_Std_Time_Weekday_instOrdOrdinal___closed__2;
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofOrdinal___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
LEAN_EXPORT uint8_t l_Std_Time_Weekday_ofOrdinal(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5; uint8_t x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; 
x_2 = lean_unsigned_to_nat(0u);
x_3 = l_Std_Time_Weekday_ofOrdinal___closed__0;
x_4 = lean_int_dec_lt(x_1, x_3);
x_5 = lean_nat_abs(x_1);
x_6 = lean_nat_dec_eq(x_5, x_2);
x_7 = lean_unsigned_to_nat(1u);
x_8 = lean_nat_sub(x_5, x_7);
lean_dec(x_5);
x_9 = lean_nat_dec_eq(x_8, x_2);
if (x_9 == 1)
{
uint8_t x_10; 
lean_dec(x_8);
x_10 = 0;
return x_10;
}
else
{
lean_object* x_11; uint8_t x_12; 
x_11 = lean_nat_sub(x_8, x_7);
lean_dec(x_8);
x_12 = lean_nat_dec_eq(x_11, x_2);
if (x_12 == 1)
{
uint8_t x_13; 
lean_dec(x_11);
x_13 = 1;
return x_13;
}
else
{
lean_object* x_14; uint8_t x_15; 
x_14 = lean_nat_sub(x_11, x_7);
lean_dec(x_11);
x_15 = lean_nat_dec_eq(x_14, x_2);
if (x_15 == 1)
{
uint8_t x_16; 
lean_dec(x_14);
x_16 = 2;
return x_16;
}
else
{
lean_object* x_17; uint8_t x_18; 
x_17 = lean_nat_sub(x_14, x_7);
lean_dec(x_14);
x_18 = lean_nat_dec_eq(x_17, x_2);
if (x_18 == 1)
{
uint8_t x_19; 
lean_dec(x_17);
x_19 = 3;
return x_19;
}
else
{
lean_object* x_20; uint8_t x_21; 
x_20 = lean_nat_sub(x_17, x_7);
lean_dec(x_17);
x_21 = lean_nat_dec_eq(x_20, x_2);
if (x_21 == 1)
{
uint8_t x_22; 
lean_dec(x_20);
x_22 = 4;
return x_22;
}
else
{
lean_object* x_23; uint8_t x_24; 
x_23 = lean_nat_sub(x_20, x_7);
lean_dec(x_20);
x_24 = lean_nat_dec_eq(x_23, x_2);
if (x_24 == 1)
{
uint8_t x_25; 
lean_dec(x_23);
x_25 = 5;
return x_25;
}
else
{
lean_object* x_26; uint8_t x_27; uint8_t x_28; 
x_26 = lean_nat_sub(x_23, x_7);
lean_dec(x_23);
x_27 = lean_nat_dec_eq(x_26, x_2);
lean_dec(x_26);
x_28 = 6;
return x_28;
}
}
}
}
}
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofOrdinal___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Std_Time_Weekday_ofOrdinal(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Nat_cast___at___00Std_Time_Weekday_toOrdinal_spec__0(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__0() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(6u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__0;
x_2 = l_Std_Time_instReprWeekday_repr___closed__15;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__1;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__2;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = lean_int_sub(x_1, x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__4;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__5;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__6;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__7;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_instReprWeekday_repr___closed__14;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__9;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__10;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__12() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__11;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__12;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__14() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(3u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__15() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__14;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__16() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__15;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__17() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__16;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__18() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__17;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__19() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__18;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__20() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(4u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__21() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__20;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__22() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__21;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__23() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__22;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__24() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__23;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__25() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__24;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__26() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(5u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__27() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__26;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__28() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__27;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__29() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__28;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__30() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__29;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__31() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__30;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__32() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__0;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__33() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__32;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__34() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__33;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__35() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__34;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__36() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__35;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__37() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(7u);
x_2 = lean_nat_to_int(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__38() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__37;
x_3 = lean_int_sub(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__39() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__38;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__40() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__39;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__41() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_toOrdinal___closed__3;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__40;
x_3 = lean_int_emod(x_2, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_toOrdinal___closed__42() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_instReprWeekday_repr___closed__15;
x_2 = l_Std_Time_Weekday_toOrdinal___closed__41;
x_3 = lean_int_add(x_2, x_1);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toOrdinal(uint8_t x_1) {
_start:
{
switch (x_1) {
case 0:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_toOrdinal___closed__8;
return x_2;
}
case 1:
{
lean_object* x_3; 
x_3 = l_Std_Time_Weekday_toOrdinal___closed__13;
return x_3;
}
case 2:
{
lean_object* x_4; 
x_4 = l_Std_Time_Weekday_toOrdinal___closed__19;
return x_4;
}
case 3:
{
lean_object* x_5; 
x_5 = l_Std_Time_Weekday_toOrdinal___closed__25;
return x_5;
}
case 4:
{
lean_object* x_6; 
x_6 = l_Std_Time_Weekday_toOrdinal___closed__31;
return x_6;
}
case 5:
{
lean_object* x_7; 
x_7 = l_Std_Time_Weekday_toOrdinal___closed__36;
return x_7;
}
default: 
{
lean_object* x_8; 
x_8 = l_Std_Time_Weekday_toOrdinal___closed__42;
return x_8;
}
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toOrdinal___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = lean_unbox(x_1);
x_3 = l_Std_Time_Weekday_toOrdinal(x_2);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instOrd___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Std_Time_Weekday_toOrdinal___boxed), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_instOrd___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Std_Time_Weekday_instOrd___closed__0;
x_2 = l_Std_Time_Weekday_instOrdOrdinal;
x_3 = lean_alloc_closure((void*)(l_compareOn___boxed), 6, 4);
lean_closure_set(x_3, 0, lean_box(0));
lean_closure_set(x_3, 1, lean_box(0));
lean_closure_set(x_3, 2, x_2);
lean_closure_set(x_3, 3, x_1);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_instOrd() {
_start:
{
lean_object* x_1; 
x_1 = l_Std_Time_Weekday_instOrd___closed__1;
return x_1;
}
}
LEAN_EXPORT lean_object* l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter___redArg(uint8_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
switch (x_1) {
case 0:
{
lean_object* x_9; lean_object* x_10; 
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
x_9 = lean_box(0);
x_10 = lean_apply_1(x_2, x_9);
return x_10;
}
case 1:
{
lean_object* x_11; lean_object* x_12; 
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_2);
x_11 = lean_box(0);
x_12 = lean_apply_1(x_3, x_11);
return x_12;
}
case 2:
{
lean_object* x_13; lean_object* x_14; 
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_3);
lean_dec(x_2);
x_13 = lean_box(0);
x_14 = lean_apply_1(x_4, x_13);
return x_14;
}
case 3:
{
lean_object* x_15; lean_object* x_16; 
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_15 = lean_box(0);
x_16 = lean_apply_1(x_5, x_15);
return x_16;
}
case 4:
{
lean_object* x_17; lean_object* x_18; 
lean_dec(x_8);
lean_dec(x_7);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_17 = lean_box(0);
x_18 = lean_apply_1(x_6, x_17);
return x_18;
}
case 5:
{
lean_object* x_19; lean_object* x_20; 
lean_dec(x_8);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_19 = lean_box(0);
x_20 = lean_apply_1(x_7, x_19);
return x_20;
}
default: 
{
lean_object* x_21; lean_object* x_22; 
lean_dec(x_7);
lean_dec(x_6);
lean_dec(x_5);
lean_dec(x_4);
lean_dec(x_3);
lean_dec(x_2);
x_21 = lean_box(0);
x_22 = lean_apply_1(x_8, x_21);
return x_22;
}
}
}
}
LEAN_EXPORT lean_object* l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
lean_object* x_10; 
x_10 = l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter___redArg(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
return x_10;
}
}
LEAN_EXPORT lean_object* l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
_start:
{
uint8_t x_10; lean_object* x_11; 
x_10 = lean_unbox(x_2);
x_11 = l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter(x_1, x_10, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
return x_11;
}
}
LEAN_EXPORT lean_object* l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter___redArg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
_start:
{
uint8_t x_9; lean_object* x_10; 
x_9 = lean_unbox(x_1);
x_10 = l___private_Std_Time_Date_Unit_Weekday_0__Std_Time_instReprWeekday_repr_match__1_splitter___redArg(x_9, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
return x_10;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toNat(uint8_t x_1) {
_start:
{
switch (x_1) {
case 0:
{
lean_object* x_2; 
x_2 = lean_unsigned_to_nat(1u);
return x_2;
}
case 1:
{
lean_object* x_3; 
x_3 = lean_unsigned_to_nat(2u);
return x_3;
}
case 2:
{
lean_object* x_4; 
x_4 = lean_unsigned_to_nat(3u);
return x_4;
}
case 3:
{
lean_object* x_5; 
x_5 = lean_unsigned_to_nat(4u);
return x_5;
}
case 4:
{
lean_object* x_6; 
x_6 = lean_unsigned_to_nat(5u);
return x_6;
}
case 5:
{
lean_object* x_7; 
x_7 = lean_unsigned_to_nat(6u);
return x_7;
}
default: 
{
lean_object* x_8; 
x_8 = lean_unsigned_to_nat(7u);
return x_8;
}
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_toNat___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = lean_unbox(x_1);
x_3 = l_Std_Time_Weekday_toNat(x_2);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x3f___closed__0() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 6;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x3f___closed__1() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 5;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x3f___closed__2() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 4;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x3f___closed__3() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 3;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x3f___closed__4() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 2;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x3f___closed__5() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 1;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x3f___closed__6() {
_start:
{
uint8_t x_1; lean_object* x_2; lean_object* x_3; 
x_1 = 0;
x_2 = lean_box(x_1);
x_3 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofNat_x3f(lean_object* x_1) {
_start:
{
lean_object* x_2; uint8_t x_3; 
x_2 = lean_unsigned_to_nat(1u);
x_3 = lean_nat_dec_eq(x_1, x_2);
if (x_3 == 0)
{
lean_object* x_4; uint8_t x_5; 
x_4 = lean_unsigned_to_nat(2u);
x_5 = lean_nat_dec_eq(x_1, x_4);
if (x_5 == 0)
{
lean_object* x_6; uint8_t x_7; 
x_6 = lean_unsigned_to_nat(3u);
x_7 = lean_nat_dec_eq(x_1, x_6);
if (x_7 == 0)
{
lean_object* x_8; uint8_t x_9; 
x_8 = lean_unsigned_to_nat(4u);
x_9 = lean_nat_dec_eq(x_1, x_8);
if (x_9 == 0)
{
lean_object* x_10; uint8_t x_11; 
x_10 = lean_unsigned_to_nat(5u);
x_11 = lean_nat_dec_eq(x_1, x_10);
if (x_11 == 0)
{
lean_object* x_12; uint8_t x_13; 
x_12 = lean_unsigned_to_nat(6u);
x_13 = lean_nat_dec_eq(x_1, x_12);
if (x_13 == 0)
{
lean_object* x_14; uint8_t x_15; 
x_14 = lean_unsigned_to_nat(7u);
x_15 = lean_nat_dec_eq(x_1, x_14);
if (x_15 == 0)
{
lean_object* x_16; 
x_16 = lean_box(0);
return x_16;
}
else
{
lean_object* x_17; 
x_17 = l_Std_Time_Weekday_ofNat_x3f___closed__0;
return x_17;
}
}
else
{
lean_object* x_18; 
x_18 = l_Std_Time_Weekday_ofNat_x3f___closed__1;
return x_18;
}
}
else
{
lean_object* x_19; 
x_19 = l_Std_Time_Weekday_ofNat_x3f___closed__2;
return x_19;
}
}
else
{
lean_object* x_20; 
x_20 = l_Std_Time_Weekday_ofNat_x3f___closed__3;
return x_20;
}
}
else
{
lean_object* x_21; 
x_21 = l_Std_Time_Weekday_ofNat_x3f___closed__4;
return x_21;
}
}
else
{
lean_object* x_22; 
x_22 = l_Std_Time_Weekday_ofNat_x3f___closed__5;
return x_22;
}
}
else
{
lean_object* x_23; 
x_23 = l_Std_Time_Weekday_ofNat_x3f___closed__6;
return x_23;
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofNat_x3f___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_ofNat_x3f(x_1);
lean_dec(x_1);
return x_2;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x21___closed__0() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Date.Unit.Weekday", 26, 26);
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x21___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("Std.Time.Weekday.ofNat!", 23, 23);
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x21___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("invalid weekday", 15, 15);
return x_1;
}
}
static lean_object* _init_l_Std_Time_Weekday_ofNat_x21___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; 
x_1 = l_Std_Time_Weekday_ofNat_x21___closed__2;
x_2 = lean_unsigned_to_nat(12u);
x_3 = lean_unsigned_to_nat(139u);
x_4 = l_Std_Time_Weekday_ofNat_x21___closed__1;
x_5 = l_Std_Time_Weekday_ofNat_x21___closed__0;
x_6 = l_mkPanicMessageWithDecl(x_5, x_4, x_3, x_2, x_1);
return x_6;
}
}
LEAN_EXPORT uint8_t l_Std_Time_Weekday_ofNat_x21(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Std_Time_Weekday_ofNat_x3f(x_1);
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; uint8_t x_7; 
x_3 = 0;
x_4 = l_Std_Time_Weekday_ofNat_x21___closed__3;
x_5 = lean_box(x_3);
x_6 = l_panic___redArg(x_5, x_4);
x_7 = lean_unbox(x_6);
lean_dec(x_6);
return x_7;
}
else
{
lean_object* x_8; uint8_t x_9; 
x_8 = lean_ctor_get(x_2, 0);
lean_inc(x_8);
lean_dec_ref(x_2);
x_9 = lean_unbox(x_8);
lean_dec(x_8);
return x_9;
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_ofNat_x21___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Std_Time_Weekday_ofNat_x21(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT uint8_t l_Std_Time_Weekday_next(uint8_t x_1) {
_start:
{
switch (x_1) {
case 0:
{
uint8_t x_2; 
x_2 = 1;
return x_2;
}
case 1:
{
uint8_t x_3; 
x_3 = 2;
return x_3;
}
case 2:
{
uint8_t x_4; 
x_4 = 3;
return x_4;
}
case 3:
{
uint8_t x_5; 
x_5 = 4;
return x_5;
}
case 4:
{
uint8_t x_6; 
x_6 = 5;
return x_6;
}
case 5:
{
uint8_t x_7; 
x_7 = 6;
return x_7;
}
default: 
{
uint8_t x_8; 
x_8 = 0;
return x_8;
}
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_next___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; uint8_t x_3; lean_object* x_4; 
x_2 = lean_unbox(x_1);
x_3 = l_Std_Time_Weekday_next(x_2);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT uint8_t l_Std_Time_Weekday_isWeekend(uint8_t x_1) {
_start:
{
switch (x_1) {
case 5:
{
uint8_t x_2; 
x_2 = 1;
return x_2;
}
case 6:
{
uint8_t x_3; 
x_3 = 1;
return x_3;
}
default: 
{
uint8_t x_4; 
x_4 = 0;
return x_4;
}
}
}
}
LEAN_EXPORT lean_object* l_Std_Time_Weekday_isWeekend___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; uint8_t x_3; lean_object* x_4; 
x_2 = lean_unbox(x_1);
x_3 = l_Std_Time_Weekday_isWeekend(x_2);
x_4 = lean_box(x_3);
return x_4;
}
}
lean_object* initialize_Std_Time_Date_Unit_Day(uint8_t builtin);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_Std_Time_Date_Unit_Weekday(uint8_t builtin) {
lean_object * res;
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_initialized = true;
res = initialize_Std_Time_Date_Unit_Day(builtin);
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Std_Time_instReprWeekday_repr___closed__0 = _init_l_Std_Time_instReprWeekday_repr___closed__0();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__0);
l_Std_Time_instReprWeekday_repr___closed__1 = _init_l_Std_Time_instReprWeekday_repr___closed__1();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__1);
l_Std_Time_instReprWeekday_repr___closed__2 = _init_l_Std_Time_instReprWeekday_repr___closed__2();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__2);
l_Std_Time_instReprWeekday_repr___closed__3 = _init_l_Std_Time_instReprWeekday_repr___closed__3();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__3);
l_Std_Time_instReprWeekday_repr___closed__4 = _init_l_Std_Time_instReprWeekday_repr___closed__4();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__4);
l_Std_Time_instReprWeekday_repr___closed__5 = _init_l_Std_Time_instReprWeekday_repr___closed__5();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__5);
l_Std_Time_instReprWeekday_repr___closed__6 = _init_l_Std_Time_instReprWeekday_repr___closed__6();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__6);
l_Std_Time_instReprWeekday_repr___closed__7 = _init_l_Std_Time_instReprWeekday_repr___closed__7();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__7);
l_Std_Time_instReprWeekday_repr___closed__8 = _init_l_Std_Time_instReprWeekday_repr___closed__8();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__8);
l_Std_Time_instReprWeekday_repr___closed__9 = _init_l_Std_Time_instReprWeekday_repr___closed__9();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__9);
l_Std_Time_instReprWeekday_repr___closed__10 = _init_l_Std_Time_instReprWeekday_repr___closed__10();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__10);
l_Std_Time_instReprWeekday_repr___closed__11 = _init_l_Std_Time_instReprWeekday_repr___closed__11();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__11);
l_Std_Time_instReprWeekday_repr___closed__12 = _init_l_Std_Time_instReprWeekday_repr___closed__12();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__12);
l_Std_Time_instReprWeekday_repr___closed__13 = _init_l_Std_Time_instReprWeekday_repr___closed__13();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__13);
l_Std_Time_instReprWeekday_repr___closed__14 = _init_l_Std_Time_instReprWeekday_repr___closed__14();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__14);
l_Std_Time_instReprWeekday_repr___closed__15 = _init_l_Std_Time_instReprWeekday_repr___closed__15();
lean_mark_persistent(l_Std_Time_instReprWeekday_repr___closed__15);
l_Std_Time_instReprWeekday___closed__0 = _init_l_Std_Time_instReprWeekday___closed__0();
lean_mark_persistent(l_Std_Time_instReprWeekday___closed__0);
l_Std_Time_instReprWeekday = _init_l_Std_Time_instReprWeekday();
lean_mark_persistent(l_Std_Time_instReprWeekday);
l_Std_Time_instInhabitedWeekday_default = _init_l_Std_Time_instInhabitedWeekday_default();
l_Std_Time_instInhabitedWeekday = _init_l_Std_Time_instInhabitedWeekday();
l_Std_Time_Weekday_instReprOrdinal___closed__0 = _init_l_Std_Time_Weekday_instReprOrdinal___closed__0();
lean_mark_persistent(l_Std_Time_Weekday_instReprOrdinal___closed__0);
l_Std_Time_Weekday_instReprOrdinal = _init_l_Std_Time_Weekday_instReprOrdinal();
lean_mark_persistent(l_Std_Time_Weekday_instReprOrdinal);
l_Std_Time_Weekday_instLTOrdinal = _init_l_Std_Time_Weekday_instLTOrdinal();
lean_mark_persistent(l_Std_Time_Weekday_instLTOrdinal);
l_Std_Time_Weekday_instLEOrdinal = _init_l_Std_Time_Weekday_instLEOrdinal();
lean_mark_persistent(l_Std_Time_Weekday_instLEOrdinal);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__0 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__0();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__0);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__1 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__1();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__1);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__2 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__2();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__2);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__3 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__3();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__3);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__4 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__4();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__4);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__5 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__5();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__5);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__6 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__6();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__6);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__7 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__7();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__7);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__8 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__8();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__8);
l_Std_Time_Weekday_instInhabitedOrdinal___closed__9 = _init_l_Std_Time_Weekday_instInhabitedOrdinal___closed__9();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal___closed__9);
l_Std_Time_Weekday_instInhabitedOrdinal = _init_l_Std_Time_Weekday_instInhabitedOrdinal();
lean_mark_persistent(l_Std_Time_Weekday_instInhabitedOrdinal);
l_Std_Time_Weekday_instOrdOrdinal___closed__0 = _init_l_Std_Time_Weekday_instOrdOrdinal___closed__0();
lean_mark_persistent(l_Std_Time_Weekday_instOrdOrdinal___closed__0);
l_Std_Time_Weekday_instOrdOrdinal___closed__1 = _init_l_Std_Time_Weekday_instOrdOrdinal___closed__1();
lean_mark_persistent(l_Std_Time_Weekday_instOrdOrdinal___closed__1);
l_Std_Time_Weekday_instOrdOrdinal___closed__2 = _init_l_Std_Time_Weekday_instOrdOrdinal___closed__2();
lean_mark_persistent(l_Std_Time_Weekday_instOrdOrdinal___closed__2);
l_Std_Time_Weekday_instOrdOrdinal = _init_l_Std_Time_Weekday_instOrdOrdinal();
lean_mark_persistent(l_Std_Time_Weekday_instOrdOrdinal);
l_Std_Time_Weekday_ofOrdinal___closed__0 = _init_l_Std_Time_Weekday_ofOrdinal___closed__0();
lean_mark_persistent(l_Std_Time_Weekday_ofOrdinal___closed__0);
l_Std_Time_Weekday_toOrdinal___closed__0 = _init_l_Std_Time_Weekday_toOrdinal___closed__0();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__0);
l_Std_Time_Weekday_toOrdinal___closed__1 = _init_l_Std_Time_Weekday_toOrdinal___closed__1();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__1);
l_Std_Time_Weekday_toOrdinal___closed__2 = _init_l_Std_Time_Weekday_toOrdinal___closed__2();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__2);
l_Std_Time_Weekday_toOrdinal___closed__3 = _init_l_Std_Time_Weekday_toOrdinal___closed__3();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__3);
l_Std_Time_Weekday_toOrdinal___closed__4 = _init_l_Std_Time_Weekday_toOrdinal___closed__4();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__4);
l_Std_Time_Weekday_toOrdinal___closed__5 = _init_l_Std_Time_Weekday_toOrdinal___closed__5();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__5);
l_Std_Time_Weekday_toOrdinal___closed__6 = _init_l_Std_Time_Weekday_toOrdinal___closed__6();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__6);
l_Std_Time_Weekday_toOrdinal___closed__7 = _init_l_Std_Time_Weekday_toOrdinal___closed__7();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__7);
l_Std_Time_Weekday_toOrdinal___closed__8 = _init_l_Std_Time_Weekday_toOrdinal___closed__8();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__8);
l_Std_Time_Weekday_toOrdinal___closed__9 = _init_l_Std_Time_Weekday_toOrdinal___closed__9();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__9);
l_Std_Time_Weekday_toOrdinal___closed__10 = _init_l_Std_Time_Weekday_toOrdinal___closed__10();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__10);
l_Std_Time_Weekday_toOrdinal___closed__11 = _init_l_Std_Time_Weekday_toOrdinal___closed__11();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__11);
l_Std_Time_Weekday_toOrdinal___closed__12 = _init_l_Std_Time_Weekday_toOrdinal___closed__12();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__12);
l_Std_Time_Weekday_toOrdinal___closed__13 = _init_l_Std_Time_Weekday_toOrdinal___closed__13();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__13);
l_Std_Time_Weekday_toOrdinal___closed__14 = _init_l_Std_Time_Weekday_toOrdinal___closed__14();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__14);
l_Std_Time_Weekday_toOrdinal___closed__15 = _init_l_Std_Time_Weekday_toOrdinal___closed__15();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__15);
l_Std_Time_Weekday_toOrdinal___closed__16 = _init_l_Std_Time_Weekday_toOrdinal___closed__16();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__16);
l_Std_Time_Weekday_toOrdinal___closed__17 = _init_l_Std_Time_Weekday_toOrdinal___closed__17();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__17);
l_Std_Time_Weekday_toOrdinal___closed__18 = _init_l_Std_Time_Weekday_toOrdinal___closed__18();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__18);
l_Std_Time_Weekday_toOrdinal___closed__19 = _init_l_Std_Time_Weekday_toOrdinal___closed__19();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__19);
l_Std_Time_Weekday_toOrdinal___closed__20 = _init_l_Std_Time_Weekday_toOrdinal___closed__20();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__20);
l_Std_Time_Weekday_toOrdinal___closed__21 = _init_l_Std_Time_Weekday_toOrdinal___closed__21();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__21);
l_Std_Time_Weekday_toOrdinal___closed__22 = _init_l_Std_Time_Weekday_toOrdinal___closed__22();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__22);
l_Std_Time_Weekday_toOrdinal___closed__23 = _init_l_Std_Time_Weekday_toOrdinal___closed__23();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__23);
l_Std_Time_Weekday_toOrdinal___closed__24 = _init_l_Std_Time_Weekday_toOrdinal___closed__24();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__24);
l_Std_Time_Weekday_toOrdinal___closed__25 = _init_l_Std_Time_Weekday_toOrdinal___closed__25();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__25);
l_Std_Time_Weekday_toOrdinal___closed__26 = _init_l_Std_Time_Weekday_toOrdinal___closed__26();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__26);
l_Std_Time_Weekday_toOrdinal___closed__27 = _init_l_Std_Time_Weekday_toOrdinal___closed__27();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__27);
l_Std_Time_Weekday_toOrdinal___closed__28 = _init_l_Std_Time_Weekday_toOrdinal___closed__28();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__28);
l_Std_Time_Weekday_toOrdinal___closed__29 = _init_l_Std_Time_Weekday_toOrdinal___closed__29();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__29);
l_Std_Time_Weekday_toOrdinal___closed__30 = _init_l_Std_Time_Weekday_toOrdinal___closed__30();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__30);
l_Std_Time_Weekday_toOrdinal___closed__31 = _init_l_Std_Time_Weekday_toOrdinal___closed__31();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__31);
l_Std_Time_Weekday_toOrdinal___closed__32 = _init_l_Std_Time_Weekday_toOrdinal___closed__32();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__32);
l_Std_Time_Weekday_toOrdinal___closed__33 = _init_l_Std_Time_Weekday_toOrdinal___closed__33();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__33);
l_Std_Time_Weekday_toOrdinal___closed__34 = _init_l_Std_Time_Weekday_toOrdinal___closed__34();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__34);
l_Std_Time_Weekday_toOrdinal___closed__35 = _init_l_Std_Time_Weekday_toOrdinal___closed__35();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__35);
l_Std_Time_Weekday_toOrdinal___closed__36 = _init_l_Std_Time_Weekday_toOrdinal___closed__36();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__36);
l_Std_Time_Weekday_toOrdinal___closed__37 = _init_l_Std_Time_Weekday_toOrdinal___closed__37();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__37);
l_Std_Time_Weekday_toOrdinal___closed__38 = _init_l_Std_Time_Weekday_toOrdinal___closed__38();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__38);
l_Std_Time_Weekday_toOrdinal___closed__39 = _init_l_Std_Time_Weekday_toOrdinal___closed__39();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__39);
l_Std_Time_Weekday_toOrdinal___closed__40 = _init_l_Std_Time_Weekday_toOrdinal___closed__40();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__40);
l_Std_Time_Weekday_toOrdinal___closed__41 = _init_l_Std_Time_Weekday_toOrdinal___closed__41();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__41);
l_Std_Time_Weekday_toOrdinal___closed__42 = _init_l_Std_Time_Weekday_toOrdinal___closed__42();
lean_mark_persistent(l_Std_Time_Weekday_toOrdinal___closed__42);
l_Std_Time_Weekday_instOrd___closed__0 = _init_l_Std_Time_Weekday_instOrd___closed__0();
lean_mark_persistent(l_Std_Time_Weekday_instOrd___closed__0);
l_Std_Time_Weekday_instOrd___closed__1 = _init_l_Std_Time_Weekday_instOrd___closed__1();
lean_mark_persistent(l_Std_Time_Weekday_instOrd___closed__1);
l_Std_Time_Weekday_instOrd = _init_l_Std_Time_Weekday_instOrd();
lean_mark_persistent(l_Std_Time_Weekday_instOrd);
l_Std_Time_Weekday_ofNat_x3f___closed__0 = _init_l_Std_Time_Weekday_ofNat_x3f___closed__0();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x3f___closed__0);
l_Std_Time_Weekday_ofNat_x3f___closed__1 = _init_l_Std_Time_Weekday_ofNat_x3f___closed__1();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x3f___closed__1);
l_Std_Time_Weekday_ofNat_x3f___closed__2 = _init_l_Std_Time_Weekday_ofNat_x3f___closed__2();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x3f___closed__2);
l_Std_Time_Weekday_ofNat_x3f___closed__3 = _init_l_Std_Time_Weekday_ofNat_x3f___closed__3();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x3f___closed__3);
l_Std_Time_Weekday_ofNat_x3f___closed__4 = _init_l_Std_Time_Weekday_ofNat_x3f___closed__4();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x3f___closed__4);
l_Std_Time_Weekday_ofNat_x3f___closed__5 = _init_l_Std_Time_Weekday_ofNat_x3f___closed__5();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x3f___closed__5);
l_Std_Time_Weekday_ofNat_x3f___closed__6 = _init_l_Std_Time_Weekday_ofNat_x3f___closed__6();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x3f___closed__6);
l_Std_Time_Weekday_ofNat_x21___closed__0 = _init_l_Std_Time_Weekday_ofNat_x21___closed__0();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x21___closed__0);
l_Std_Time_Weekday_ofNat_x21___closed__1 = _init_l_Std_Time_Weekday_ofNat_x21___closed__1();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x21___closed__1);
l_Std_Time_Weekday_ofNat_x21___closed__2 = _init_l_Std_Time_Weekday_ofNat_x21___closed__2();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x21___closed__2);
l_Std_Time_Weekday_ofNat_x21___closed__3 = _init_l_Std_Time_Weekday_ofNat_x21___closed__3();
lean_mark_persistent(l_Std_Time_Weekday_ofNat_x21___closed__3);
return lean_io_result_mk_ok(lean_box(0));
}
#ifdef __cplusplus
}
#endif
